<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <canvas style="background-color:gray;" id="canvas1" width="1200" height="900"></canvas>


    <script>
        var canvas1 = document.querySelector("#canvas1");
        var cvsCtx = canvas1.getContext("2d");

        var img1 = new Image();
        img1.src = "img/timg.jpg";

        var img2 = new Image();
        img2.src = "img/timg2.jpg";
       

        img1.onload = function(){
            cvsCtx.drawImage(img1,10,10,500,300);  
        }
    
        img2.onload = function(){
            cvsCtx.drawImage(img2,0,0,100,100,600,10,500,300);  
        }

    </script>


</body>
</html>